{% extends "default.html" %}

{% load i18n %}
{% load jalali_view %}
{% load digg_paginator %}

{% block title %} {% trans "Advertizers" %} - {{ user }}{% endblock %}
{% block page_title %} {% trans "Advertizers" %} - {{ user }}{% endblock %}

{% block page_content %}
<div>
	<div>
		<a href="/ads/advertizer/register/">
		<img src="/static/images/add_red_16x16.png" />
		{% trans "Register New Advertizer" %}</a>
	</div>
	<br  class="clear"/>
	<div>
	<table>
		<thead>
			<tr>
				<th>{% trans "Type" %}</th>
				<th>{% trans "Title" %}</th>
				<th>{% trans "Description" %}</th>
				<th></th>
			</tr>
		</thead>
		{% for adv in current_page.object_list %}
		<tr class='{% cycle "Odd" "Even" %}'>
			<td>{% trans adv.type %}</td>
			<td>{{ adv.title }}</td>
			<td>{{ adv.description|truncatewords:5 }}</td>
			<td>
				<a href="/ads/advertizer/update/{{ adv.id }}/">
					<img src="/static/images/edit.png" alt='{% trans "Edit" %}' />
				</a>
			</td>
		</tr>
		{% endfor %}
	</table>
	</div>
	<br class="clear"/>
	<div>
	{% digg_paginator %}
	</div>
	<br class="clear"/>
</div>
{% endblock page_content %}
